#include "Order.hpp"

namespace FeedHandler
{
	bool operator<(const Order & lhs, const Order & rhs)
	{
		return lhs.id < rhs.id;
	}
}

std::ostream & operator<<(std::ostream & os, const FeedHandler::Order & order)
{
	os << order.id << ", "
		<< ((order.side == FeedHandler::Order::Buy)
			? "Buy"
			: (order.side == FeedHandler::Order::Sell)
				? "Sell"
				: "Unknown") << ", "
		<< order.quantity << ", "
		<< order.price;

	return os;
}

